package com.neusoft.nep.grid.caluate;

public class CaluateAQI {
    public static int caluateAQI(int SO2AQI,int COAQI,int PM25AQI) {
        int AQI = 0;
        if (SO2AQI >= COAQI && SO2AQI >= PM25AQI) {
            AQI=SO2AQI;
        }else if (COAQI >= SO2AQI&& COAQI >= PM25AQI) {
            AQI=COAQI;
        }else if (PM25AQI >= SO2AQI&& PM25AQI >= COAQI) {
            AQI=PM25AQI;
        }
        return AQI;
    }
    public static String givelevel(int AQI){
        String level = null;
        if(AQI==1){
            level= "一级    优";
        }else if(AQI==2){
            level= "二级    良";
        }else if(AQI==3){
            level= "三级    轻度污染";
        }else if(AQI==4){
            level= "四级    中度污染";
        }else if(AQI==5){
            level= "五级    重度污染";
        }else if(AQI==6){
            level= "六级    严重污染";
        }
        return level;
    }
}

